import * as xlsx from 'xlsx'

/**
 * 表格导出
 * @param tableRef 表单引用实例
 * @param name excel名称
 */
export const exportTable = (tableRef, name) => {
    const tableDom = tableRef.value?.$el
    const wb = xlsx.utils.table_to_book(tableDom)
    xlsx.writeFile(wb, name + '.xlsx')
}